<?php

use App\Http\Controllers\Attendance\AttendanceBusReportController;
use App\Http\Controllers\Attendance\AttendanceController;
use App\Http\Controllers\Attendance\AttendanceDataController;
use App\Http\Controllers\Attendance\AttendancePersonnelReportController;
use App\Http\Controllers\DingAttendance\DingAttendanceController;
use App\Http\Controllers\DingAttendanceStatus\DingAttendanceStatusController;
use App\Http\Controllers\DingDropOff\DingDropOffController;
use App\Http\Controllers\FixedCost\FixedCostController;
use App\Http\Controllers\MaintainRepair\DoneApplyController;
use App\Http\Controllers\MaintainRepair\TodoApplyController;
use App\Http\Controllers\Mileage\DropOffController;
use App\Http\Controllers\Operation\OperationController;
use App\Http\Controllers\TwoLevelMainte\TwoLevelMainteController;
use App\Http\Controllers\VehicleAccounting\AccountImportDataController;
use App\Http\Controllers\VehicleAccounting\AccountImportTemplateController;
use App\Http\Controllers\VehicleAccounting\AccountingRateController;
use App\Http\Controllers\VehicleAccounting\AccountReportController;
use App\Http\Controllers\NewPay\PayImportDataController;
use App\Http\Controllers\NewPay\PayImportTemplateController;
use App\Http\Controllers\NewPay\PayReportController;
use App\Http\Controllers\Pay\AdminPayController;
use App\Http\Controllers\VehicleAccounting\LineAccountingController;
use App\Http\Controllers\VehicleAccounting\VehicleAccountingController;
use App\Http\Controllers\Bus\BusScrapController;
use App\Http\Controllers\Income\IncomeController;
use App\Http\Controllers\Income\IncomeCashController;
use App\Models\Role;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\DB;
use App\Console\Commands\syncAttendanceCollect;
use App\Http\Controllers\Mileage\MileageController;
use App\Http\Controllers\Bus\BusDistributionController;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    $user = $request->user();
    $roleId = DB::table('sys_roles_users')->where('user_id', $user['id'])->pluck('role_id')->toArray();
    $user->roleName = Role::query()->whereIn('id', $roleId)->pluck('name')->toArray();
    return $user;
});

Route::post('password/reset', 'Auth\ResetPasswordController@reset');
Route::post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail');

Route::post('login', 'AuthController@login');
Route::post('logout', 'AuthController@logout');
Route::post('refresh', 'AuthController@refresh');
Route::post('user', 'AuthController@user');

Route::group(['middleware' => ['api']], function () {
    // 用户管理
    Route::post('user/regist', 'User\RegistController@registUser');
    Route::any('user/users', 'User\RegistController@getUsers');
    Route::post('user/resetPassword', 'User\RegistController@resetPassword');
    Route::post('user/getUserDictData', 'User\RegistController@getUserDictData');
    Route::post('user/deleteUserData', 'User\RegistController@deleteUserData');
    Route::post('user/editRegistUser', 'User\RegistController@editRegistUser');
    Route::post('user/getUser', 'User\RegistController@getUser');

    // 部门管理
    Route::get('department/getByParentId/{id}', 'System\DepartmentController@getByParentId');
    Route::get('department/getAllDepartment', 'System\DepartmentController@getAllDepartment');
    Route::get('department/getClassDepartment', 'System\DepartmentController@getClassDepartment');
    Route::post('department/addDepartment', 'System\DepartmentController@add');
    Route::post('department/editDepartment', 'System\DepartmentController@edit');

    // 数据字典管理
    Route::get('dict/dicts', 'System\DictController@dicts');
    Route::post('dict/addDict', 'System\DictController@addDict');
    Route::post('dict/editDict', 'System\DictController@editDict');
    Route::post('dict/deleteDict', 'System\DictController@deleteDict');
    Route::post('dict/dictDataList', 'System\DictController@dictDataList');
    Route::post('dict/addDictData', 'System\DictController@addDictData');
    Route::post('dict/editDictData', 'System\DictController@editDictData');
    Route::post('dict/deleteDictData', 'System\DictController@deleteDictData');

    // 菜单管理
    Route::get('menu/getmenus', 'System\MenuController@getMenus');
    Route::get('menu/getrouter', 'System\MenuController@getRouter');
    Route::get('menu/menuselecter', 'System\MenuController@getMenuSelecter');
    Route::post('menu/menutree', 'System\MenuController@getMenuTree');
    Route::post('menu/add', 'System\MenuController@add');
    Route::post('menu/addMenu', 'System\MenuController@addMenu');
    Route::post('menu/editMenu', 'System\MenuController@editMenu');
    Route::post('menu/deleteMenu', 'System\MenuController@deleteMenu');

    // 权限管理
    Route::post('role/deleteRoleData', 'System\RoleController@deleteRoleData');
    Route::get('role/roles', 'System\RoleController@getRoles');
    Route::post('role/add', 'System\RoleController@add');
    Route::post('role/edit', 'System\RoleController@edit');
    Route::post('role/setDefaultRole', 'System\RoleController@setDefaultRole');
    Route::post('role/setrolemenus', 'System\RoleController@setRoleMenus');
    Route::post('role/getDepartmentTree', 'System\RoleController@getDepartmentTree');
    Route::post('role/editRoleDep', 'System\RoleController@editRoleDep');

    // 操作日志
    Route::post('log/getOperationLogs', 'Logs\LogController@getOperationLogs');

    // 上传文件
    Route::post('upload/file', 'Upload\UploadController@uploadFile');
    Route::post('upload/signFile', 'Upload\UploadController@uploadSignFile');

    // 人员管理
    Route::post('personnel', 'Personnel\PersonnelController@store');
    Route::post('personnelList', 'Personnel\PersonnelController@personnelList');
    Route::delete('personnel', 'Personnel\PersonnelController@destroy');
    Route::get('personnel/{id}', 'Personnel\PersonnelController@edit');
    Route::get('getAllPersonnel', 'Personnel\PersonnelController@getAllPersonnel');
    Route::put('personnel/{id}', 'Personnel\PersonnelController@update');
    Route::post('importAdmin', 'Personnel\PersonnelController@importAdmin');
    Route::post('importDriver', 'Personnel\PersonnelController@importDriver');
    Route::post('addDeparturePersonnel', 'Personnel\PersonnelController@addDeparturePersonnel');
    Route::post('editDeparturePersonnel', 'Personnel\PersonnelController@editDeparturePersonnel');
    Route::post('departureDestroy', 'Personnel\PersonnelController@departureDestroy');
    Route::post('departureList', 'Personnel\PersonnelController@departureList');
    Route::post('addInjuredPersonnel', 'Personnel\PersonnelController@addInjuredPersonnel');
    Route::post('editInjuredPersonnel', 'Personnel\PersonnelController@editInjuredPersonnel');
    Route::post('injuredDestroy', 'Personnel\PersonnelController@injuredDestroy');
    Route::post('injuredList', 'Personnel\PersonnelController@injuredList');
    Route::get('downLoadOne', 'Personnel\PersonnelController@downLoadOne');
    Route::get('downLoad', 'Personnel\PersonnelController@downLoad');
    Route::get('exportPersonnel', 'Personnel\PersonnelController@exportPersonnel');
    Route::get('exportDriverPersonnel', 'Personnel\PersonnelController@exportDriverPersonnel');
    Route::post('assessmentList', 'Personnel\AssessmentController@getAssessmentList');

    // 车辆管理
    Route::post('bus', 'Bus\BusController@store');
    Route::post('busList', 'Bus\BusController@busList');
    Route::delete('bus', 'Bus\BusController@destroy');
    Route::get('bus/{id}', 'Bus\BusController@edit');
    Route::put('bus/{id}', 'Bus\BusController@update');
    Route::get('licensePlateNumList', 'Bus\BusController@getLicensePlateNumList');
    Route::get('getLineLicensePlateNum', 'Bus\BusController@getLineLicensePlateNum');
    Route::post('importBus', 'Bus\BusController@importBus');
    Route::post('busIsCheckList', 'Bus\BusIsCheckController@busIsCheckList');
    Route::put('busIsCheck/{id}', 'Bus\BusIsCheckController@update');

    Route::post('busDistribution', 'Bus\BusDistributionController@store');
    Route::post('busDistributionList', 'Bus\BusDistributionController@busDistributionList');
    Route::delete('busDistribution', 'Bus\BusDistributionController@destroy');
    Route::get('busDistribution/{id}', 'Bus\BusDistributionController@edit');
    Route::put('busDistribution/{id}', 'Bus\BusDistributionController@update');
    //获取所有车队数组
    Route::post('busDistribution/getTeamlist', [BusDistributionController::class, 'getTeamlist']);
    //获取所有线路
    Route::post('getLines', [BusDistributionController::class, 'getLines']);
    //钉钉端获取所有线路
    Route::post('ding/getLines', [BusDistributionController::class, 'getLines']);

    //车辆报废列表
    Route::post('busScrapList', [BusScrapController::class, 'busScrapList']);
    Route::post('idLicensePlateNumList', [BusScrapController::class, 'idLicensePlateNumList']);
    //添加车辆报废信息
    Route::post('busScrap', [BusScrapController::class, 'store']);
    //修改车辆报废信息
    Route::get('busScrap/{id}', [BusScrapController::class, 'edit']);
    Route::put('busScrap/{id}', [BusScrapController::class, 'update']);
    //删除车辆报废信息
    Route::delete('busScrap', [BusScrapController::class, 'destroy']);

    // 收入记录
    Route::post('importCard', [IncomeController::class, 'importCard']);
    Route::post('incomeCardList', [IncomeController::class, 'incomeCardList']);
    Route::post('importPost', [IncomeController::class, 'importPost']);
    Route::post('incomePostList', [IncomeController::class, 'incomePostList']);

    Route::post('importCash', [IncomeCashController::class, 'importCash']);
    Route::post('incomeCashList', [IncomeCashController::class, 'incomeCashList']);
    Route::post('incomeCash', [IncomeCashController::class, 'storeCash']);
    Route::put('incomeCash/{id}', [IncomeCashController::class, 'updateCash']);
    Route::delete('incomeCash', [IncomeCashController::class, 'destroyCash']);

    Route::post('incomeCharteredCarList', 'Income\IncomeCharteredCarController@incomeCharteredCarList');
    Route::post('incomeCharteredCar', 'Income\IncomeCharteredCarController@storeCharteredCar');
    Route::put('incomeCharteredCar/{id}', 'Income\IncomeCharteredCarController@updateCharteredCar');
    Route::delete('incomeCharteredCar', 'Income\IncomeCharteredCarController@destroyCharteredCar');

    Route::post('incomeCharteredCarFixedList', 'Income\IncomeCharteredCarFixedController@incomeCharteredCarFixedList');
    Route::post('incomeCharteredCarFixed', 'Income\IncomeCharteredCarFixedController@storeCharteredCarFixed');
    Route::put('incomeCharteredCarFixed/{id}', 'Income\IncomeCharteredCarFixedController@updateCharteredCarFixed');
    Route::delete('incomeCharteredCarFixed', 'Income\IncomeCharteredCarFixedController@destroyCharteredCarFixed');
    //打卡记录列表
    Route::post('attendance/attendanceList', [AttendanceController::class, 'attendanceList']);
    Route::post('attendance/getAttendanceCollectStatus', [AttendanceController::class, 'getAttendanceCollectStatus']);
    Route::post('attendance/updateAttendanceCollect', [AttendanceController::class, 'updateAttendanceCollect']);
    Route::post('attendance', 'Attendance\AttendanceController@storeAttendance');
    Route::put('attendance/{id}', 'Attendance\AttendanceController@updateAttendance');
    Route::delete('attendance', 'Attendance\AttendanceController@destroyAttendance');
    Route::post('importAttendance', 'Attendance\AttendanceController@importAttendance');
    Route::post('importPersonnelAttendance', 'Attendance\PersonnelAttendanceController@importPersonnelAttendance');
    Route::post('attendanceBusList', 'Attendance\AttendanceBusController@attendanceList');
    Route::post('getReportData', 'Attendance\AttendanceReportController@getReportData');
    Route::post('getAttendancePersonnelData', 'Attendance\PersonnelAttendanceController@getAttendancePersonnelData');


    Route::post('machineList', 'Attendance\MachineController@machineList');
    Route::post('importMachine', 'Attendance\MachineController@importMachine');

    // 充气记录
    Route::post('importGas', 'Gas\GasController@importGas');
    Route::post('gasList', 'Gas\GasController@gasList');
    Route::post('importGasYh', 'Gas\GasYhController@importGasYh');
    Route::post('gasYhList', 'Gas\GasYhController@gasYhList');
    Route::post('importGasYhCheck', 'Gas\GasYhCheckController@importGasYhCheck');
    Route::post('deleteDuplicateData', 'Gas\GasController@deleteDuplicateData');
    Route::post('gasYhCheckList', 'Gas\GasYhCheckController@gasYhCheckList');

    // 充电记录
    Route::post('importCharge', 'Charge\ChargeController@importCharge');
    Route::post('chargeList', 'Charge\ChargeController@chargeList');

    // 充电统计
    Route::post('chargeStatiList', 'Charge\ChargeStatiController@chargeStatiList');
    Route::get('exportChargeStati', 'Charge\ChargeStatiController@exportChargeStati');
    Route::post('incomeStatiList', 'Charge\ChargeStatiController@incomeStatiList');
    Route::get('exportIncomeStati', 'Charge\ChargeStatiController@exportIncomeStati');
    Route::post('kmStatiList', 'Charge\ChargeStatiController@kmStatiList');
    Route::get('exportKmStati', 'Charge\ChargeStatiController@exportKmStati');
    Route::post('yhStatiList', 'Charge\ChargeStatiController@yhStatiList');
    Route::get('exportYhGasStati', 'Charge\ChargeStatiController@exportYhGasStati');
    Route::post('skStatiList', 'Charge\ChargeStatiController@skStatiList');
    Route::get('exportSkGasStati', 'Charge\ChargeStatiController@exportSkGasStati');
    Route::post('yhAmtStatiList', 'Charge\ChargeStatiController@yhAmtStatiList');
    Route::get('exportYhAmtGasStati', 'Charge\ChargeStatiController@exportYhAmtGasStati');
    // 里程记录
    Route::post('importMileage', 'Mileage\MileageController@importMileage');
    Route::post('mileageList', 'Mileage\MileageController@mileageList');
    Route::post('dropOffList', 'Mileage\DropOffController@dropOffList');
    Route::post('importDropOff', 'Mileage\DropOffController@importDropOff');
    Route::post('updateDropOff', [DropOffController::class, 'updateDropOff']);
    Route::post('mileage/dictData', 'Mileage\DropOffController@dictData');
    Route::post('mileage/mileageLogList',  [MileageController::class, 'mileageLogList']);
    Route::post('mileage/mileageRefresh',  [MileageController::class, 'refreshMileageData']);
    //掉趟导出
    Route::get('exportDropOff', [DropOffController::class, 'exportDropOff']);

    // 保险管理
    Route::post('insureList', 'Insure\InsureController@insureList');
    Route::post('addInsure', 'Insure\InsureController@addInsure');
    Route::post('editInsure', 'Insure\InsureController@editInsure');
    Route::post('dictData', 'Insure\InsureController@dictData');
    Route::post('insureInfo', 'Insure\InsureController@insureInfo');
    Route::delete('delInsure', 'Insure\InsureController@delInsure');
    Route::post('importInsure', 'Insure\InsureController@importInsure');

    // 二级维护
    Route::post('twoLevelMainteList', 'TwoLevelMainte\TwoLevelMainteController@twoLevelMainteList');
    Route::post('addTwoLevelMainte', 'TwoLevelMainte\TwoLevelMainteController@addTwoLevelMainte');
    Route::post('editTwoLevelMainte', 'TwoLevelMainte\TwoLevelMainteController@editTwoLevelMainte');
    Route::post('twoLevelMainteInfo', 'TwoLevelMainte\TwoLevelMainteController@twoLevelMainteInfo');
    Route::delete('delTwoLevelMainte', 'TwoLevelMainte\TwoLevelMainteController@delTwoLevelMainte');
    Route::post('twoLevel/store', [TwoLevelMainteController::class, 'store']);

    // 物资库存
    Route::post('getUser', 'Material\MaterialController@getUser');
    Route::post('lineBusNum', 'Material\MaterialController@lineBusNum');
    Route::post('workflowData', 'Material\MaterialController@workflowData');
    Route::post('materialList', 'Material\MaterialController@materialList');
    Route::post('materialListSelect', 'Material\MaterialController@materialListSelect');
    Route::post('addMaterial', 'Material\MaterialController@addMaterial');
    Route::post('editMaterial', 'Material\MaterialController@editMaterial');
    Route::post('materialInfo', 'Material\MaterialController@materialInfo');
    Route::post('delMaterial', 'Material\MaterialController@delMaterial');
    Route::post('materialStatiList', 'Material\MaterialController@materialStatiList');
    Route::get('exportMaterialStati', 'Material\ExportMaterialController@exportMaterialStati');
    //入库
    Route::post('putMaterialList', 'Material\MaterialController@putMaterialList');
    Route::post('addPutMaterial', 'Material\MaterialController@addPutMaterial');
    Route::post('editPutMaterial', 'Material\MaterialController@editPutMaterial');
    Route::post('editMaterialDetail', 'Material\MaterialController@editMaterialDetail');
    Route::post('editAddPutMaterialDetail', 'Material\MaterialController@editAddPutMaterialDetail');
    Route::delete('editDelPutMaterialDetail', 'Material\MaterialController@editDelPutMaterialDetail');
    Route::post('putMaterialInfo', 'Material\MaterialController@putMaterialInfo');
    Route::delete('delPutMaterial', 'Material\MaterialController@delPutMaterial');
    Route::post('toAuditPut', 'Material\MaterialController@toAuditPut');
    Route::get('exportPutMaterial', 'Material\ExportMaterialController@exportPutMaterial');

    //出入库详情
    Route::post('addMaterialDetail', 'Material\MaterialController@addMaterialDetail');
    //出库
    Route::post('outMaterialList', 'Material\MaterialController@outMaterialList');
    Route::post('addOutMaterial', 'Material\MaterialController@addOutMaterial');
    Route::post('editOutMaterial', 'Material\MaterialController@editOutMaterial');
    Route::post('outMaterialInfo', 'Material\MaterialController@outMaterialInfo');
    Route::delete('delOutMaterial', 'Material\MaterialController@delOutMaterial');
    Route::post('editOutMaterialDetail', 'Material\MaterialController@editOutMaterialDetail');
    Route::post('editAddOutMaterialDetail', 'Material\MaterialController@editAddOutMaterialDetail');
    Route::delete('editDelOutMaterialDetail', 'Material\MaterialController@editDelOutMaterialDetail');
    Route::post('toAuditOut', 'Material\MaterialController@toAuditOut');
    Route::post('outMaterialStatiList', 'Material\MaterialController@outMaterialStatiList');
    Route::get('exportOutMaterialStati', 'Material\ExportMaterialController@exportOutMaterialStati');
    Route::get('exportOutMaterial', 'Material\ExportMaterialController@exportOutMaterial');
    //轮胎出库
    Route::post('tyreOutMaterialList', 'Material\MaterialController@tyreOutMaterialList');
    Route::post('addTyreOutMaterial', 'Material\MaterialController@addTyreOutMaterial');
    Route::post('editTyreOutMaterial', 'Material\MaterialController@editTyreOutMaterial');
    Route::post('tyreOutMaterialInfo', 'Material\MaterialController@tyreOutMaterialInfo');
    Route::delete('delTyreOutMaterial', 'Material\MaterialController@delTyreOutMaterial');
    Route::post('editTyreOutMaterialDetail', 'Material\MaterialController@editTyreOutMaterialDetail');
    Route::post('editAddTyreOutMaterialDetail', 'Material\MaterialController@editAddTyreOutMaterialDetail');
    Route::delete('editDelTyreOutMaterialDetail', 'Material\MaterialController@editDelTyreOutMaterialDetail');
    Route::post('toAuditTyreOut', 'Material\MaterialController@toAuditTyreOut');
    Route::post('tyreOutMaterialStatiList', 'Material\MaterialController@tyreOutMaterialStatiList');
    Route::get('exportTyreOutMaterialStati', 'Material\ExportMaterialController@exportTyreOutMaterialStati');
    Route::get('exportTyreOutMaterial', 'Material\ExportMaterialController@exportTyreOutMaterial');

    // 维修申请
    Route::post('applyList', 'MaintainRepair\MrApplyController@applyList');
    Route::get('applyList/{id}', 'MaintainRepair\MrApplyController@editApply');
    Route::post('mrApply', 'MaintainRepair\MrApplyController@storeApply');
    Route::post('storeWeixiu/{id}', 'MaintainRepair\MrApplyController@storeWeixiu');
    Route::put('mrApply/{id}', 'MaintainRepair\MrApplyController@updateApply');
    Route::delete('mrApply', 'MaintainRepair\MrApplyController@destroyApply');
    Route::post('mrApply/audit', 'MaintainRepair\MrApplyController@audit');

    Route::post('applyTodoList', [TodoApplyController::class, 'applyTodoList']);
    Route::post('applyDoneList', [DoneApplyController::class, 'applyDoneList']);

    // 维修费用
    Route::post('costList', 'MaintainRepair\MrCostController@costList');
    Route::post('mrCost', 'MaintainRepair\MrCostController@storeCost');
    Route::put('mrCost/{id}', 'MaintainRepair\MrCostController@updateCost');
    Route::delete('mrCost', 'MaintainRepair\MrCostController@destroyCost');

    //任务工资
    Route::post('taskDalary', 'TaskSalary\TaskSalaryController@taskDalary');
    Route::post('taskDalaryList', 'TaskSalary\TaskSalaryController@taskDalaryList');
    Route::post('editTaskDalary', 'TaskSalary\TaskSalaryController@editTaskDalary');
    Route::post('editTaskDalarys', 'TaskSalary\TaskSalaryController@editTaskDalarys');
    Route::post('taskDalaryInfo', 'TaskSalary\TaskSalaryController@taskDalaryInfo');
    Route::post('sortTaskDalary', 'TaskSalary\TaskSalaryController@sortTaskDalary');
    Route::get('exportTaskDalary', 'TaskSalary\TaskSalaryController@exportTaskDalary');

    //任务工资排名
    Route::post('taskRank', 'TaskSalary\TaskSalaryController@taskRank');
    Route::post('taskRankList', 'TaskSalary\TaskSalaryController@taskRankList');
    Route::post('editTaskRank', 'TaskSalary\TaskSalaryController@editTaskRank');
    Route::post('editTaskRanks', 'TaskSalary\TaskSalaryController@editTaskRanks');
    Route::post('taskRankInfo', 'TaskSalary\TaskSalaryController@taskRankInfo');
    Route::get('exportTaskRank', 'TaskSalary\TaskSalaryController@exportTaskRank');

    //充电车任务工资
    Route::post('eleTaskDalary', 'TaskSalary\EleTaskSalaryController@eleTaskDalary');
    Route::post('eleTaskDalaryList', 'TaskSalary\EleTaskSalaryController@eleTaskDalaryList');
    Route::post('editEleTaskDalary', 'TaskSalary\EleTaskSalaryController@editEleTaskDalary');
    Route::post('editEleTaskDalarys', 'TaskSalary\EleTaskSalaryController@editEleTaskDalarys');
    Route::post('eleTaskDalaryInfo', 'TaskSalary\EleTaskSalaryController@eleTaskDalaryInfo');
    Route::post('sortEleTaskDalary', 'TaskSalary\EleTaskSalaryController@sortEleTaskDalary');
    Route::get('exportEleTaskDalary', 'TaskSalary\EleTaskSalaryController@exportEleTaskDalary');

    //充电车任务工资排名
    Route::post('eleTaskRank', 'TaskSalary\EleTaskSalaryController@eleTaskRank');
    Route::post('eleTaskRankList', 'TaskSalary\EleTaskSalaryController@eleTaskRankList');
    Route::post('editEleTaskRank', 'TaskSalary\EleTaskSalaryController@editEleTaskRank');
    Route::post('editEleTaskRanks', 'TaskSalary\EleTaskSalaryController@editEleTaskRanks');
    Route::post('eleTaskRankInfo', 'TaskSalary\EleTaskSalaryController@eleTaskRankInfo');
    Route::get('exportEleTaskRank', 'TaskSalary\EleTaskSalaryController@exportEleTaskRank');

    //单车线路均值汇总表
    Route::post('lineTaskDalaryList', 'TaskSalary\LineAverTaskSalaryController@lineTaskDalaryList');
    Route::get('exportLineTaskDalary', 'TaskSalary\LineAverTaskSalaryController@exportLineTaskDalary');

    //单车核算
    Route::post('vehicleAccounting', [VehicleAccountingController::class, 'vehicleAccounting']);
    Route::post('updateBusNote', [VehicleAccountingController::class, 'updateBusNote']);
    Route::get('exportVehicleAccounting', [VehicleAccountingController::class, 'exportVehicleAccounting']);
    Route::post('lineAccounting', [LineAccountingController::class, 'lineAccounting']);
    Route::post('updateLineNote', [LineAccountingController::class, 'updateLineNote']);
    Route::get('exportLineAccounting', [LineAccountingController::class, 'exportLineAccounting']);

    //考勤统计
    Route::post('attendanceAccounting', 'Attendance\AttendanceController@attendanceAccounting');
    Route::post('attendanceAccountingDate', 'Attendance\AttendanceController@attendanceAccountingDate');
    Route::post('attendanceAccountingData', 'Attendance\AttendanceController@attendanceAccountingData');
    Route::post('attendanceAccountingInfo', 'Attendance\AttendanceController@attendanceAccountingInfo');
    Route::post('editAttendanceAccounting', 'Attendance\AttendanceController@editAttendanceAccounting');
    Route::get('exportAttendanceAccounting', 'Attendance\AttendanceController@exportAttendanceAccounting');

    // 事故
    Route::post('accidentList', 'Accident\AccidentController@accidentList');
    Route::post('accident', 'Accident\AccidentController@storeAccident');
    Route::put('accident/{id}', 'Accident\AccidentController@updateAccident');
    Route::delete('accident', 'Accident\AccidentController@destroyAccident');
    Route::get('accident/{id}', 'Accident\AccidentController@edit');
    Route::post('accident/audit', 'Accident\AccidentController@audit');
    Route::post('accident/driverPersonnel', 'Accident\AccidentController@driverPersonnel'); //获取驾驶员人名列表
    // 社会赔付
    Route::post('accidentSocietyList', 'Accident\AccidentSocietyController@accidentSocietyList');
    Route::post('accidentSociety', 'Accident\AccidentSocietyController@storeAccidentSociety');
    Route::put('accidentSociety/{id}', 'Accident\AccidentSocietyController@updateAccidentSociety');
    Route::delete('accidentSociety', 'Accident\AccidentSocietyController@destroyAccidentSociety');
    Route::get('accidentSociety/{id}', 'Accident\AccidentSocietyController@edit');
    Route::post('accidentSociety/audit', 'Accident\AccidentSocietyController@audit');


    // 包车明细管理
    Route::post('charterBusList', 'CharterBus\CharterBusController@charterBusList');
    Route::post('addCharterBus', 'CharterBus\CharterBusController@addCharterBus');
    Route::post('editCharterBus', 'CharterBus\CharterBusController@editCharterBus');
    Route::post('charterBusInfo', 'CharterBus\CharterBusController@charterBusInfo');
    Route::delete('delCharterBus', 'CharterBus\CharterBusController@delCharterBus');
    Route::post('importCharterBus', 'CharterBus\CharterBusController@importCharterBus');

    // 工资报表
    Route::post('leaderPayList', 'Pay\LeaderPayController@leaderPayList');
    Route::get('exportLeaderPay', 'Pay\LeaderPayController@exportLeaderPay');
    Route::post('adminPayList', 'Pay\AdminPayController@adminPayList');
    Route::get('getPersonnelTypeData', 'Pay\AdminPayController@getPersonnelTypeData');
    Route::get('exportAdminPay', 'Pay\AdminPayController@exportAdminPay');
    Route::post('driverPayList', 'Pay\DriverPayController@driverPayList');
    Route::get('exportDriverPay', 'Pay\DriverPayController@exportDriverPay');

    Route::post('importYl', 'Pay\PayController@importYl');
    Route::post('importYiliao', 'Pay\PayController@importYiliao');
    Route::post('importShiye', 'Pay\PayController@importShiye');
    Route::post('importGongshang', 'Pay\PayController@importGongshang');
    Route::post('importGongling', 'Pay\PayController@importGongling');
    Route::post('importGongjijin', 'Pay\PayController@importGongjijin');
    Route::post('importSy', 'Pay\PayController@importSy');
    Route::post('importGs', 'Pay\PayController@importGs');
    Route::post('importOther', 'Pay\PayController@importOther');
    Route::post('adminRecordList', 'Pay\PayController@adminRecordList');
    Route::post('driverRecordList', 'Pay\PayController@driverRecordList');
    Route::post('yanglaoList', 'Pay\PayController@yanglaoList');
    Route::post('yiliaoList', 'Pay\PayController@yiliaoList');
    Route::post('shiyeList', 'Pay\PayController@shiyeList');
    Route::post('gongshangList', 'Pay\PayController@gongshangList');
    Route::post('gonglingList', 'Pay\PayController@gonglingList');
    Route::post('gongjijinList', 'Pay\PayController@gongjijinList');
    Route::get('pay/getPaySettings', 'Pay\PayController@getPaySettings');
    Route::post('pay/saveSettings', 'Pay\PayController@saveSettings');

    Route::post('fixedCostList', 'FixedCost\FixedCostController@fixedCostList');
    Route::post('fixedCostTree', 'FixedCost\FixedCostController@fixedCostTree');
    //年度客运成本    
    Route::post('fixedCostTable', [FixedCostController::class, 'fixedCostTable']);
    Route::post('addFixedCostTree', 'FixedCost\FixedCostController@addFixedCostTree');
    Route::post('editFixedCostTree', 'FixedCost\FixedCostController@editFixedCostTree');
    Route::post('updateFixedCostTree', 'FixedCost\FixedCostController@updateFixedCostTree');
    Route::post('updateFixedCostTable', [FixedCostController::class, 'updateFixedCostTable']);
    Route::post('fixedCost', 'FixedCost\FixedCostController@store');
    Route::put('fixedCost/{id}', 'FixedCost\FixedCostController@update');
    Route::get('fixedCost/{id}', 'FixedCost\FixedCostController@edit');
    Route::delete('fixedCost', 'FixedCost\FixedCostController@destroy');
    Route::delete('destroyFixedCostTree', [FixedCostController::class, 'destroyFixedCostTree']);
    Route::post('addCostKey', [FixedCostController::class, 'addCostKey']);
    Route::post('getTreeKeyList', [FixedCostController::class, 'getTreeKeyList']);

    Route::post('payOthersList', 'Pay\PayOthersController@payOthersList');
    Route::post('payOthers', 'Pay\PayOthersController@store');
    Route::put('payOthers/{id}', 'Pay\PayOthersController@update');
    Route::get('payOthers/{id}', 'Pay\PayOthersController@edit');
    Route::delete('payOthers', 'Pay\PayOthersController@destroy');

    Route::post('payImportTemplateList', [PayImportTemplateController::class, 'payImportTemplateList']);
    Route::post('payImportTemplate', [PayImportTemplateController::class, 'store']);
    Route::delete('payImportTemplate', [PayImportTemplateController::class, 'destroy']);
    Route::put('payImportTemplate/{tableName}', [PayImportTemplateController::class, 'update']);
    Route::get('exportTemplate', [PayImportTemplateController::class, 'exportTemplate']);
    Route::post('importPayData', [PayImportDataController::class, 'importPayData']);
    Route::post('payImportDataList', [PayImportDataController::class, 'payImportDataList']);
    Route::post('initTableName', [PayReportController::class, 'initTableName']);
    Route::post('getColumns', [PayReportController::class, 'getColumns']);
    Route::post('payReport', [PayReportController::class, 'store']);
    Route::delete('payReport', [PayReportController::class, 'destroy']);
    Route::put('payReport/{reportName}', [PayReportController::class, 'update']);
    Route::post('payReportList', [PayReportController::class, 'payReportList']);
    Route::post('addRoot', [PayReportController::class, 'addRoot']);
    Route::post('updateRoot', [PayReportController::class, 'updateRoot']);
    Route::post('getReportColumn', [AdminPayController::class, 'getReportColumn']);

    Route::post('accountImportTemplateList', [AccountImportTemplateController::class, 'accountingImportTemplateList']);
    Route::post('accountImportTemplate', [AccountImportTemplateController::class, 'store']);
    Route::delete('accountImportTemplate', [AccountImportTemplateController::class, 'destroy']);
    Route::put('accountImportTemplate/{tableName}', [AccountImportTemplateController::class, 'update']);
    Route::get('exportAccountTemplate', [AccountImportTemplateController::class, 'exportTemplate']);
    Route::post('importAccountData', [AccountImportDataController::class, 'importPayData']);
    Route::post('accountImportDataList', [AccountImportDataController::class, 'accountingImportDataList']);
    Route::post('initAccountTableName', [AccountReportController::class, 'initTableName']);
    Route::post('getAccountColumns', [AccountReportController::class, 'getColumns']);
    Route::post('accountReport', [AccountReportController::class, 'store']);
    Route::delete('accountReport', [AccountReportController::class, 'destroy']);
    Route::put('accountReport/{reportName}', [AccountReportController::class, 'update']);
    Route::post('accountReportList', [AccountReportController::class, 'accountingReportList']);
    Route::post('addAccountRoot', [AccountReportController::class, 'addRoot']);
    Route::post('updateAccountRoot', [AccountReportController::class, 'updateRoot']);
    Route::post('getAccountReportColumn', [AdminPayController::class, 'getReportColumn']);

    /******钉钉物资接口 */
    Route::get('ding/getToken', 'DingMaterial\MaterialController@getToken');
    Route::post('ding/userId', 'DingMaterial\MaterialController@userId');
    Route::post('ding/getUser', 'DingMaterial\MaterialController@getUser');

    Route::post('ding/myMaterialList', 'DingMaterial\MaterialController@myMaterialList');
    // 物资库存
    Route::post('ding/lineBusNum', 'DingMaterial\MaterialController@lineBusNum');
    Route::post('ding/workflowData', 'DingMaterial\MaterialController@workflowData');
    Route::post('ding/materialList', 'DingMaterial\MaterialController@materialList');
    Route::post('ding/materialInfo', 'DingMaterial\MaterialController@materialInfo');
    Route::post('ding/delMaterial', 'DingMaterial\MaterialController@delMaterial');
    Route::post('ding/materialStatiList', 'DingMaterial\MaterialController@materialStatiList');

    //入库
    Route::post('ding/putMaterialList', 'DingMaterial\MaterialController@putMaterialList');
    Route::post('ding/addMaterial', 'DingMaterial\MaterialController@addMaterial');
    Route::post('ding/editMaterial', 'DingMaterial\MaterialController@editMaterial');
    Route::post('ding/editPutMaterial', 'DingMaterial\MaterialController@editPutMaterial');
    Route::post('ding/editMaterialDetail', 'DingMaterial\MaterialController@editMaterialDetail');
    Route::post('ding/editAddPutMaterialDetail', 'DingMaterial\MaterialController@editAddPutMaterialDetail');
    Route::post('ding/editDelPutMaterialDetail', 'DingMaterial\MaterialController@editDelPutMaterialDetail');
    Route::post('ding/putMaterialInfo', 'DingMaterial\MaterialController@putMaterialInfo');
    Route::post('ding/delPutMaterial', 'DingMaterial\MaterialController@delPutMaterial');
    Route::post('ding/toAuditPut', 'DingMaterial\MaterialController@toAuditPut');

    //出入库详情
    Route::post('ding/addMaterialDetail', 'DingMaterial\MaterialController@addMaterialDetail');
    //出库
    Route::post('ding/outMaterialList', 'DingMaterial\MaterialController@outMaterialList');
    Route::post('ding/addOutMaterial', 'DingMaterial\MaterialController@addOutMaterial');
    Route::post('ding/editOutMaterial', 'DingMaterial\MaterialController@editOutMaterial');
    Route::post('ding/outMaterialInfo', 'DingMaterial\MaterialController@outMaterialInfo');
    Route::post('ding/delOutMaterial', 'DingMaterial\MaterialController@delOutMaterial');
    Route::post('ding/editOutMaterialDetail', 'DingMaterial\MaterialController@editOutMaterialDetail');
    Route::post('ding/editAddOutMaterialDetail', 'DingMaterial\MaterialController@editAddOutMaterialDetail');
    Route::post('ding/editDelOutMaterialDetail', 'DingMaterial\MaterialController@editDelOutMaterialDetail');
    Route::post('ding/toAuditOut', 'DingMaterial\MaterialController@toAuditOut');
    //轮胎出库
    Route::post('ding/tyreOutMaterialList', 'DingMaterial\MaterialController@tyreOutMaterialList');
    Route::post('ding/addTyreOutMaterial', 'DingMaterial\MaterialController@addTyreOutMaterial');
    Route::post('ding/editTyreOutMaterial', 'DingMaterial\MaterialController@editTyreOutMaterial');
    Route::post('ding/tyreOutMaterialInfo', 'DingMaterial\MaterialController@tyreOutMaterialInfo');
    Route::post('ding/delTyreOutMaterial', 'DingMaterial\MaterialController@delTyreOutMaterial');
    Route::post('ding/editTyreOutMaterialDetail', 'DingMaterial\MaterialController@editTyreOutMaterialDetail');
    Route::post('ding/editAddTyreOutMaterialDetail', 'DingMaterial\MaterialController@editAddTyreOutMaterialDetail');
    Route::post('ding/editDelTyreOutMaterialDetail', 'DingMaterial\MaterialController@editDelTyreOutMaterialDetail');
    Route::post('ding/toAuditTyreOut', 'DingMaterial\MaterialController@toAuditTyreOut');
    /******钉钉维修接口 */
    Route::post('upload/mrSignFile', 'Upload\UploadController@uploadMrSignFile');
    Route::post('ding/upload/file', 'DingMaintainRepair\MrApplyController@uploadFile');
    Route::post('ding/applyList', 'DingMaintainRepair\MrApplyController@applyList');
    Route::post('ding/editApply', 'DingMaintainRepair\MrApplyController@editApply');
    Route::post('ding/storeApply', 'DingMaintainRepair\MrApplyController@storeApply');
    Route::post('ding/storeWeixiu', 'DingMaintainRepair\MrApplyController@storeWeixiu');
    Route::post('ding/updateApply', 'DingMaintainRepair\MrApplyController@updateApply');
    Route::post('ding/destroyApply', 'DingMaintainRepair\MrApplyController@destroyApply');
    Route::post('ding/mrApply/audit', 'DingMaintainRepair\MrApplyController@audit');

    // 税率设置
    Route::post('rateList', [AccountingRateController::class, 'rateList']);
    Route::post('storeRate', [AccountingRateController::class, 'storeRate']);
    Route::post('updateRate', [AccountingRateController::class, 'updateRate']);

    // 线路运营
    Route::post('operationFileList', [OperationController::class, 'operationFileList']);
    Route::post('storeOperationFile', [OperationController::class, 'storeOperationFile']);

    // 钉钉掉趟接口
    Route::post('ding/dropTripList', [DingDropOffController::class, 'dropTripList']);
    Route::post('ding/storeDropTrip', [DingDropOffController::class, 'storeDropTrip']);
    Route::post('ding/deleteDropTrip', [DingDropOffController::class, 'deleteDropTrip']);
    Route::post('ding/isBusNum', [DingDropOffController::class, 'isBusNum']);

    // 钉钉司机签到接口
    Route::post('ding/attendanceList', [DingAttendanceController::class, 'attendanceList']);
    //钉钉车队长上报接口
    Route::post('ding/storeAttendance', [DingAttendanceController::class, 'storeAttendance']);
    //钉钉获取车队长上报类型接口
    Route::post('ding/getReportType', [DingAttendanceController::class, 'getReportType']);
    Route::post('ding/deleteAttendance', [DingAttendanceController::class, 'deleteAttendance']);

    /******钉钉签到状态修改相关接口 */
    //获取列表页数据
    Route::post('ding/attendanceStatusList', [DingAttendanceStatusController::class, 'attendanceStatusList']);
    //按车牌号查看考勤详情
    Route::post('ding/busDetailData', [DingAttendanceStatusController::class, 'busDetailData']);
    //按驾驶员查看考勤详情
    Route::post('ding/driverDetailData', [DingAttendanceStatusController::class, 'driverDetailData']);
    //修改打卡记录中间表数据
    Route::post('ding/updateAttendanceStatus', [DingAttendanceStatusController::class, 'updateAttendanceStatus']);
    //修改车辆(驾驶员)汇总数据
    Route::post('ding/updateCollectData', [DingAttendanceStatusController::class, 'updateCollectData']);

    /*******PC段考勤相关接口 */
    //车队长上报列表数据
    Route::post('attendanceDataList', [AttendanceDataController::class, 'attendanceList']);
    //获取车队长上报类型
    Route::post('attendanceData/getReportType', [AttendanceDataController::class, 'getReportType']);
    //新增车队长上报数据
    Route::post('attendanceData', [AttendanceDataController::class, 'storeAttendance']);
    //编辑修改车队长上报数据
    Route::post('updateAttendanceData', [AttendanceDataController::class, 'updateAttendance']);
    //删除车队长上报数据
    Route::delete('destroyAttendance', [AttendanceDataController::class, 'destroyAttendance']);
    // 考勤统计
    Route::post('attendanceBusReport/attendanceBusReportList', [AttendanceBusReportController::class, 'attendanceBusReportList']);
    Route::get('exportAttendanceBusList', [AttendanceBusReportController::class, 'exportAttendanceBusList']);
    Route::post('attendancePersonnelReportList', [AttendancePersonnelReportController::class, 'attendancePersonnelReportList']);
    Route::get('exportAttendancePersonnelList', [AttendancePersonnelReportController::class, 'exportAttendancePersonnelList']);
    Route::post('getBusAttendanceCollect', [syncAttendanceCollect::class, 'getBusAttendanceCollect']);
});
